import matplotlib
matplotlib.use("Agg")
from pylab import *

x = [-20, -15, -10, -5, -2, 2, 5, 10]
w = [5, 5, 5, 3, 4, 3, 5, 5]
en = [0, 0, 3, 16, 120, 122, 151, 8]
fr = [2, 37, 126, 183, 71, 1, 0, 0]

bar(x, fr, width=w, alpha=1, color='r', label="French")
bar(x, en, width=w, alpha=0.6, color='b', label="English")
xlabel("BLEU Difference")
ylabel("# Systems")
legend()
title("Pivot translation")

savefig("pivot.png", dpi=70)
